﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Navigation;
using System.Windows.Shapes;

namespace NavigateTools
{
    /// <summary>
    /// Interaktionslogik für MainWindow.xaml
    /// </summary>
    public partial class MainWindow : Window
    {
        public MainWindow()
        {
            InitializeComponent();
        }

        private void Grid_Loaded(object sender, RoutedEventArgs e)
        {
            Navigation nav = new Navigation();

            nav.Latitude1 = 1.04;
            nav.Longitude1 = 20.04;
            nav.Latitude2 = 1;
            nav.Longitude2 = 20.08;
            nav.Radius = 100;

            for (double t = 0; t < 1000; t++)
            {
                nav.Calculate();

                nav.Latitude1 += 0.0001 * Math.Cos(nav.Heading / 180 * Math.PI);
                nav.Longitude1 += 0.0001 * Math.Sin(nav.Heading / 180 * Math.PI);

                Console.WriteLine(t.ToString() + "; " + nav.Latitude1.ToString() + "; " + nav.Longitude1.ToString());
            }
        }
    }
}
